/*
 *接口编写处...
*如果接口需要做Action的权限验证，请在Action上使用属性
*如: [ApiActionPermission("tb_project_reviewstandar_item",Enums.ActionPermissionOptions.Search)]
 */
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Components.Forms;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using System.Collections.Generic;
using System.Net;
using System.Threading.Tasks;
using MYData.Core.Extensions;
using MYData.Core.Utilities;
using MYData.Entity.DomainModels;
using MYData.Entity.DomainModels.ApiEntity.detail;
 
using MYData.System.IServices;

namespace MYData.System.Controllers
{
    public partial class tb_project_reviewstandar_itemController
    {
        private readonly Itb_project_reviewstandar_itemService _service;//访问业务代码
        private readonly IHttpContextAccessor _httpContextAccessor;

        [ActivatorUtilitiesConstructor]
        public tb_project_reviewstandar_itemController(
            Itb_project_reviewstandar_itemService service,
            IHttpContextAccessor httpContextAccessor
        )
        : base(service)
        {
            _service = service;
            _httpContextAccessor = httpContextAccessor;
        }

        /// <summary>
        /// 下拉框显示
        /// </summary>
        /// <returns></returns>
        [HttpGet, Route("SelectList")]
        [AllowAnonymous]
        public async Task<object> SelectList()
        {
            return await _service.SelectList();
        }
        /// <summary>
        /// 数据显示
        /// </summary>
        /// <returns></returns>
        [HttpGet, Route("GetList")]
        [AllowAnonymous]
        public async Task<object> GetList()
        {
            return await _service.GetList();
        }
        /// <summary>
        /// 逻辑删除
        /// </summary>
        /// <returns></returns>
        [HttpGet, Route("DeleteList")]
        [AllowAnonymous]
        public async Task<object> DeleteList(string id)
        {
            return await _service.DeleteList(id);
        }
        /// <summary>
        /// 修改
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("UpdateInfo")]
        [AllowAnonymous]
        public async Task<object> UpdateInfo([FromBody] reviewstandarDetail_Dto dto)
        {
            return await _service.UpdateInfo(dto);
        }
    }
}
